<html>
<head><meta charset="utf-8"><title>tracing-tree · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html">tracing-tree</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201164668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201164668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201164668">(Jun 17 2020 at 16:17)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="198819">@David Barsky</span>, I've been playing around with using <code>tracing-tree</code> in chalk, and it's been working pretty well!<br>
I just have a couple bits of feedback:</p>
<ul>
<li>A release on <a href="http://crates.io">crates.io</a> would be good, if you're comfortable with publishing it</li>
<li>It would be nice to have an option to enable/disable ANSI color codes (they get garbled when piping output to a file), I submitted a <a href="https://github.com/davidbarsky/tracing-tree/pull/6">quick PR to make the change</a></li>
<li>Sometimes it's more readable to have <a href="https://github.com/rust-lang/chalk/blob/a27bfd0213689e2e372215ff98c47e15526b6fe1/chalk-engine/src/logic.rs#L443-L445">values pretty-printed</a>, but the pretty-printed output isn't indented properly because indents are only printed in front of the beginning of a span/event</li>
</ul>
<p>I'm not really sure of a good solution for the last point, so I wondered if you had any ideas on that?</p>



<a name="201164847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201164847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201164847">(Jun 17 2020 at 16:19)</a>:</h4>
<p>For context, here's a picture illustrating the indentation issue:<br>
<a href="/user_uploads/4715/8Dj9hiEALROX_pbjPVClQkL1/Screen-Shot-2020-06-16-at-5.06.16-PM.png">Screen-Shot-2020-06-16-at-5.06.16-PM.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/8Dj9hiEALROX_pbjPVClQkL1/Screen-Shot-2020-06-16-at-5.06.16-PM.png" title="Screen-Shot-2020-06-16-at-5.06.16-PM.png"><img src="/user_uploads/4715/8Dj9hiEALROX_pbjPVClQkL1/Screen-Shot-2020-06-16-at-5.06.16-PM.png"></a></div>



<a name="201165028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201165028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201165028">(Jun 17 2020 at 16:20)</a>:</h4>
<p>I can do a release, I already thought I did...</p>



<a name="201165056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201165056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201165056">(Jun 17 2020 at 16:20)</a>:</h4>
<p>(but i'm glad this is working for you.)</p>



<a name="201165114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201165114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201165114">(Jun 17 2020 at 16:21)</a>:</h4>
<p>I'll take a look at the PR to remove the ansi colors. I can do a release shortly after that?</p>



<a name="201165182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201165182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201165182">(Jun 17 2020 at 16:21)</a>:</h4>
<p>hmm, that's a good question. the pretty-printing would need to preserve the indentation already there across _all_ lines.</p>



<a name="201165322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201165322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201165322">(Jun 17 2020 at 16:22)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> okay, squash and merged.</p>



<a name="201196787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201196787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201196787">(Jun 17 2020 at 20:34)</a>:</h4>
<p>By the way, should this issue be closed <a href="https://github.com/rust-lang/chalk/issues/337">https://github.com/rust-lang/chalk/issues/337</a>? It seems that tracing has landed, am i right?</p>



<a name="201624810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201624810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201624810">(Jun 22 2020 at 16:00)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span>: published <a href="https://crates.io/crates/tracing-tree">https://crates.io/crates/tracing-tree</a>.</p>



<a name="201624824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201624824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201624824">(Jun 22 2020 at 16:00)</a>:</h4>
<p>I thought I did earlier... guess not.</p>



<a name="201632028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201632028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#201632028">(Jun 22 2020 at 16:55)</a>:</h4>
<p>Thanks!</p>



<a name="202540840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202540840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202540840">(Jul 01 2020 at 08:01)</a>:</h4>
<p>Should tracing be an optional feature? It seems moderately hefty and some users might want to disable it.</p>



<a name="202541257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202541257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202541257">(Jul 01 2020 at 08:05)</a>:</h4>
<p>CC <span class="user-mention" data-user-id="133169">@matklad</span></p>



<a name="202541778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202541778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202541778">(Jul 01 2020 at 08:12)</a>:</h4>
<p>Yeah, the various tty deps definitely look like something that shouldn't end up in the final binary</p>



<a name="202544591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202544591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202544591">(Jul 01 2020 at 08:49)</a>:</h4>
<p>we do need a way of debugging Chalk in RA though</p>



<a name="202544622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202544622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202544622">(Jul 01 2020 at 08:49)</a>:</h4>
<p>currently (without tracing-tree), the Chalk logs are pretty hard to read</p>



<a name="202544724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202544724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202544724">(Jul 01 2020 at 08:50)</a>:</h4>
<p>(and actually, currently you can't actually get the Chalk logs in RA, I have some code locally that adds a tracing listener but haven't merged it yet)</p>



<a name="202544913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202544913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202544913">(Jul 01 2020 at 08:52)</a>:</h4>
<p>Well, we recently finished the prototype for dumping <code>.chalk</code> files for a program, so we should integrate that into rust-analyzer at some point</p>



<a name="202544924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202544924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202544924">(Jul 01 2020 at 08:52)</a>:</h4>
<p>well yeah, but that's not a replacement for logs</p>



<a name="202545075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202545075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202545075">(Jul 01 2020 at 08:54)</a>:</h4>
<p>Then I'm not sure what you mean with debugging Chalk in RA, if both of these options aren't it</p>



<a name="202545157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202545157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202545157">(Jul 01 2020 at 08:55)</a>:</h4>
<p>the tracing logs are what I mean, I meant that we can't just disable tracing in Chalk from rust-analyzer since we need it</p>



<a name="202568099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568099">(Jul 01 2020 at 13:25)</a>:</h4>
<p>I think chalk could remove the subscriber and rust-analyzer would be just fine</p>



<a name="202568151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568151">(Jul 01 2020 at 13:25)</a>:</h4>
<p>the instrumentation would still be there via the tracing dep even if you don't compile tracing-tree</p>



<a name="202568248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568248">(Jul 01 2020 at 13:26)</a>:</h4>
<p>and then rust-analyzer's tracing-tree dep would still work with chalks instrumentation</p>



<a name="202568354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568354">(Jul 01 2020 at 13:27)</a>:</h4>
<p>I'm a bit worried about the compile times. It's pretty much an uphill battle and I've tried to trim out the heavier dependencies, especially proc macros.</p>



<a name="202568382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568382">(Jul 01 2020 at 13:27)</a>:</h4>
<p>About that, <code>chalk</code> still depends on an old <code>salsa</code> with a pre-1.0 <code>syn</code>, I should file a PR..</p>



<a name="202568422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568422">(Jul 01 2020 at 13:27)</a>:</h4>
<p>unless Chalk just undoes the move to tracing, I don't think we can avoid using it</p>



<a name="202568503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568503">(Jul 01 2020 at 13:28)</a>:</h4>
<p><span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> but that's only <code>chalk</code>, right, not the crates we actually depend on?</p>



<a name="202568546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568546">(Jul 01 2020 at 13:28)</a>:</h4>
<p>I think updating salsa in chalk isn't completely trivial, there's an issue for it</p>



<a name="202568562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202568562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202568562">(Jul 01 2020 at 13:28)</a>:</h4>
<p>Yeah</p>



<a name="202584168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584168">(Jul 01 2020 at 15:39)</a>:</h4>
<p>(hi, tracing-subscriber co-author) tracing-subscriber should only really be used by applications/binaries; <code>tracing</code> and <code>tracing-core</code> are pretty lightweight; they're comparable to <code>log</code>.</p>



<a name="202584330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584330">(Jul 01 2020 at 15:40)</a>:</h4>
<p>that being said, <code>tracing-subscriber</code> _does_ have a lot of optional dependencies (including tty's; chrono, etc.) that you can disable: <a href="https://github.com/tokio-rs/tracing/blob/master/tracing-subscriber/Cargo.toml#L26">https://github.com/tokio-rs/tracing/blob/master/tracing-subscriber/Cargo.toml#L26</a></p>



<a name="202584418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584418">(Jul 01 2020 at 15:41)</a>:</h4>
<p><span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> not sure which portions you'd like disabled, but I can try helping you with that?</p>



<a name="202584551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584551">(Jul 01 2020 at 15:42)</a>:</h4>
<p>btw <span class="user-mention" data-user-id="198819">@David Barsky</span> I noticed that it seemed to print to stdout; is that configurable somehow? (I didn't really investigate)</p>



<a name="202584623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584623">(Jul 01 2020 at 15:43)</a>:</h4>
<p>It might have changed after <a href="https://github.com/rust-lang-nursery/chalk/issues/544">chalk#544</a>, but <code>tracing-subscriber</code> does show up in rust-analyzer, taking some 15s to compile (plus extra 25s for <code>tracing-attributes</code>): <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1987#issuecomment-652202248">https://github.com/rust-analyzer/rust-analyzer/issues/1987#issuecomment-652202248</a></p>



<a name="202584753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202584753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202584753">(Jul 01 2020 at 15:44)</a>:</h4>
<p>I was thinking that the <code>#[instrument]</code> attributes could be disabled (as in <code>#[cfg_attr]</code>), but maybe that's too much of a hassle</p>



<a name="202585050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585050">(Jul 01 2020 at 15:45)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> yeah, pretty configurable. <code>tracing-tree</code>, my quick hack that's used in chalk, writes to stdout by default, but it can be really easy to change tracing-subscriber to write to, for instance, a file or stderr, or anything that fits <a href="https://docs.rs/tracing-subscriber/0.2.6/tracing_subscriber/fmt/trait.MakeWriter.html">https://docs.rs/tracing-subscriber/0.2.6/tracing_subscriber/fmt/trait.MakeWriter.html</a></p>



<a name="202585214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585214">(Jul 01 2020 at 15:46)</a>:</h4>
<p>attributes can be disabled in<code>tracing</code>, fwiw: <a href="https://docs.rs/tracing/0.1.15/tracing/#crate-feature-flags">https://docs.rs/tracing/0.1.15/tracing/#crate-feature-flags</a></p>



<a name="202585287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585287">(Jul 01 2020 at 15:47)</a>:</h4>
<p>But they're used in <code>chalk</code>, so..</p>



<a name="202585300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585300">(Jul 01 2020 at 15:47)</a>:</h4>
<p>ah, hrm.</p>



<a name="202585535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585535">(Jul 01 2020 at 15:49)</a>:</h4>
<p>I guess we should take a look at <a href="https://github.com/dtolnay/watt">https://github.com/dtolnay/watt</a>, huh</p>



<a name="202585677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585677">(Jul 01 2020 at 15:50)</a>:</h4>
<p>We already bring in <code>syn</code> for <code>serde</code>. We have some <code>opt-level = 0</code> for proc macro crates in <code>Cargo.toml</code>, maybe we should add <code>tracing-attributes</code> there</p>



<a name="202585706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202585706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202585706">(Jul 01 2020 at 15:51)</a>:</h4>
<p>In the meanwhile, there are worse things in that build profile I linked :-(</p>



<a name="202586688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202586688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202586688">(Jul 01 2020 at 15:57)</a>:</h4>
<p>might be a good idea adding tracing-attributes to <code>opt-level = 0</code>, then. lemme know if I can help in any way, and i'm sorry about the inconvenience this caused y'all.</p>



<a name="202586783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202586783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202586783">(Jul 01 2020 at 15:57)</a>:</h4>
<p><code>tracing-tree</code> is kinda kinda similar to ra-prof; i'd be happy to try to get parity between the two so you can maybe cut down on some stuff?</p>



<a name="202586849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202586849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202586849">(Jul 01 2020 at 15:58)</a>:</h4>
<p>(if that's what you want, that is.)</p>



<a name="202587564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202587564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202587564">(Jul 01 2020 at 16:02)</a>:</h4>
<p>I'll try to look into feature-gating <code>chalk</code>'s use of <code>tracing</code></p>



<a name="202588428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202588428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202588428">(Jul 01 2020 at 16:08)</a>:</h4>
<p>So it shouldn't be <em>too</em> hard to feature-gate <code>tracing-subscriber</code>, <code>tracing-tree</code>,  and the tracing attributes, but feature gating <code>tracing</code> itself would be a bit harder.</p>



<a name="202589655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202589655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202589655">(Jul 01 2020 at 16:18)</a>:</h4>
<p>i'm also not sure that gating <code>tracing</code> is worthwhile in the grand scheme of things; it _should_ have a comparable weight as <code>log</code></p>



<a name="202589998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202589998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202589998">(Jul 01 2020 at 16:21)</a>:</h4>
<p>anyways, if the rust-analyzer folks would be interested in getting <code>tracing</code> in rust-analyzer, i'm sure Eliza and I would be happy to help.</p>



<a name="202594364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202594364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202594364">(Jul 01 2020 at 16:55)</a>:</h4>
<p>Just <a href="https://github.com/rust-lang/chalk/pull/549">opened a PR</a> to feature gate the use of <code>tracing-subscriber</code>, <code>tracing-tree</code>, and <code>tracing-attributes</code> in chalk.</p>



<a name="202598170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202598170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202598170">(Jul 01 2020 at 17:27)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> sorry for the delay in reviewing <a href="https://github.com/davidbarsky/tracing-tree/pull/8#pullrequestreview-441062979">https://github.com/davidbarsky/tracing-tree/pull/8#pullrequestreview-441062979</a>. It's approved, but do you have any thoughts?</p>



<a name="202598939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202598939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202598939">(Jul 01 2020 at 17:33)</a>:</h4>
<p><span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> to be clear, the motivation is both selfish and a desire to have something like ra-prof in <code>tracing</code> :). no pressure, obviously!</p>



<a name="202614603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202614603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202614603">(Jul 01 2020 at 19:38)</a>:</h4>
<p>I also am somewhat skeptical about gating on <code>tracing</code>. I can totally understand the sentiment of compile times, runtime performance, and binary size. I think I'm okay with gating basically the <code>with_tracing_logs</code> part of things. But I don't think we should be doing anything special for <code>instrument</code></p>



<a name="202614672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202614672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202614672">(Jul 01 2020 at 19:39)</a>:</h4>
<p>I <em>would</em> like to see some sort of "cost" (performance, compile time, binary size) analysis of the dependencies</p>



<a name="202614981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202614981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202614981">(Jul 01 2020 at 19:41)</a>:</h4>
<p>I also wonder how much "extra" it would be to have a very simple log to catch <code>CHALK_DEBUG</code> in place of the full <code>tracing-tree</code> if <code>tracing-full</code> feature is inactive</p>



<a name="202716152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202716152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202716152">(Jul 02 2020 at 17:05)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198819">David Barsky</span> <a href="#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202598170">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="230601">Nathan Whitaker</span> sorry for the delay in reviewing <a href="https://github.com/davidbarsky/tracing-tree/pull/8#pullrequestreview-441062979">https://github.com/davidbarsky/tracing-tree/pull/8#pullrequestreview-441062979</a>. It's approved, but do you have any thoughts?</p>
</blockquote>
<p>No worries! Left some thoughts on the PR</p>



<a name="202825328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202825328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202825328">(Jul 03 2020 at 17:41)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> I've invited you as a collaborator to the <code>tracing-tree</code> repo and added you as an author to the Cargo.toml author field. I've also published <code>tracing-tree 0.1.2</code>, which introduces your lines feature.</p>



<a name="202825391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/202825391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#202825391">(Jul 03 2020 at 17:42)</a>:</h4>
<p>I don't know your <a href="http://crates.io">crates.io</a> account, but feel free to DM it/mention it here.</p>



<a name="203092502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203092502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203092502">(Jul 07 2020 at 11:51)</a>:</h4>
<p>I am looking at <code>cargo llmv-lines</code> right now, and looks like tracing instrumentaion does add a amount of stuff, which sounds like it could be trimmed-down/removed:</p>
<div class="codehilite"><pre><span></span><code><span class="w">  </span><span class="n">Lines</span><span class="w">           </span><span class="n">Copies</span><span class="w">        </span><span class="n">Function</span><span class="w"> </span><span class="n">name</span><span class="w"></span>
<span class="w">  </span><span class="o">-----</span><span class="w">           </span><span class="o">------</span><span class="w">        </span><span class="o">-------------</span><span class="w"></span>
<span class="w">  </span><span class="mi">1687120</span><span class="w"> </span><span class="p">(</span><span class="mi">100</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="mi">52706</span><span class="w"> </span><span class="p">(</span><span class="mi">100</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="p">(</span><span class="n">TOTAL</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="mi">59685</span><span class="w"> </span><span class="p">(</span><span class="mf">3.5</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">115</span><span class="w"> </span><span class="p">(</span><span class="mf">0.2</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">alloc</span>::<span class="n">raw_vec</span>::<span class="n">RawVec</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="n">A</span><span class="o">&gt;</span>::<span class="n">grow</span><span class="w"></span>
<span class="w">    </span><span class="mi">55452</span><span class="w"> </span><span class="p">(</span><span class="mf">3.3</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">474</span><span class="w"> </span><span class="p">(</span><span class="mf">0.9</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">tracing_core</span>::<span class="n">dispatcher</span>::<span class="n">get_default</span>::<span class="p">{{</span><span class="n">closure</span><span class="p">}}</span><span class="w"> </span><span class="o">&lt;*</span><span class="w"></span>
<span class="w">    </span><span class="mi">41932</span><span class="w"> </span><span class="p">(</span><span class="mf">2.5</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">333</span><span class="w"> </span><span class="p">(</span><span class="mf">0.6</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">iter</span>::<span class="n">traits</span>::<span class="n">iterator</span>::<span class="nb">Iterator</span>::<span class="n">try_fold</span><span class="w"></span>
<span class="w">    </span><span class="mi">40148</span><span class="w"> </span><span class="p">(</span><span class="mf">2.4</span><span class="o">%</span><span class="p">)</span><span class="w">   </span><span class="mi">3971</span><span class="w"> </span><span class="p">(</span><span class="mf">7.5</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">ptr</span>::<span class="n">drop_in_place</span><span class="w"></span>
<span class="w">    </span><span class="mi">38954</span><span class="w"> </span><span class="p">(</span><span class="mf">2.3</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">553</span><span class="w"> </span><span class="p">(</span><span class="mf">1.0</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">option</span>::<span class="nb">Option</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span>::<span class="n">map</span><span class="w"></span>
<span class="w">    </span><span class="mi">33309</span><span class="w"> </span><span class="p">(</span><span class="mf">2.0</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">483</span><span class="w"> </span><span class="p">(</span><span class="mf">0.9</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">result</span>::<span class="nb">Result</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="n">E</span><span class="o">&gt;</span>::<span class="n">map_err</span><span class="w"></span>
<span class="w">    </span><span class="mi">33232</span><span class="w"> </span><span class="p">(</span><span class="mf">2.0</span><span class="o">%</span><span class="p">)</span><span class="w">     </span><span class="mi">22</span><span class="w"> </span><span class="p">(</span><span class="mf">0.0</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">salsa</span>::<span class="n">derived</span>::<span class="n">slot</span>::<span class="n">Slot</span><span class="o">&lt;</span><span class="n">Q</span><span class="p">,</span><span class="n">MP</span><span class="o">&gt;</span>::<span class="n">read_upgrade</span><span class="w"></span>
<span class="w">    </span><span class="mi">31552</span><span class="w"> </span><span class="p">(</span><span class="mf">1.9</span><span class="o">%</span><span class="p">)</span><span class="w">     </span><span class="mi">44</span><span class="w"> </span><span class="p">(</span><span class="mf">0.1</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">salsa</span>::<span class="n">derived</span>::<span class="n">slot</span>::<span class="n">Slot</span><span class="o">&lt;</span><span class="n">Q</span><span class="p">,</span><span class="n">MP</span><span class="o">&gt;</span>::<span class="n">probe</span><span class="w"></span>
<span class="w">    </span><span class="mi">29611</span><span class="w"> </span><span class="p">(</span><span class="mf">1.8</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">508</span><span class="w"> </span><span class="p">(</span><span class="mf">1.0</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">result</span>::<span class="nb">Result</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="n">E</span><span class="o">&gt;</span>::<span class="n">unwrap_or_else</span><span class="w"></span>
<span class="w">    </span><span class="mi">21912</span><span class="w"> </span><span class="p">(</span><span class="mf">1.3</span><span class="o">%</span><span class="p">)</span><span class="w">     </span><span class="mi">22</span><span class="w"> </span><span class="p">(</span><span class="mf">0.0</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">salsa</span>::<span class="n">derived</span>::<span class="n">slot</span>::<span class="n">Slot</span><span class="o">&lt;</span><span class="n">Q</span><span class="p">,</span><span class="n">MP</span><span class="o">&gt;</span>::<span class="n">maybe_changed_since</span><span class="w"></span>
<span class="w">    </span><span class="mi">20914</span><span class="w"> </span><span class="p">(</span><span class="mf">1.2</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">427</span><span class="w"> </span><span class="p">(</span><span class="mf">0.8</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">core</span>::<span class="n">ptr</span>::<span class="n">swap_nonoverlapping_one</span><span class="w"></span>
<span class="w">    </span><span class="mi">20740</span><span class="w"> </span><span class="p">(</span><span class="mf">1.2</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">207</span><span class="w"> </span><span class="p">(</span><span class="mf">0.4</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">alloc</span>::<span class="n">vec</span>::<span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span>::<span class="n">extend_desugared</span><span class="w"></span>
<span class="w">    </span><span class="mi">20114</span><span class="w"> </span><span class="p">(</span><span class="mf">1.2</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">155</span><span class="w"> </span><span class="p">(</span><span class="mf">0.3</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="o">&lt;</span><span class="n">alloc</span>::<span class="n">vec</span>::<span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">alloc</span>::<span class="n">vec</span>::<span class="n">SpecExtend</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="n">I</span><span class="o">&gt;&gt;</span>::<span class="n">from_iter</span><span class="w"></span>
<span class="w">    </span><span class="mi">19138</span><span class="w"> </span><span class="p">(</span><span class="mf">1.1</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">264</span><span class="w"> </span><span class="p">(</span><span class="mf">0.5</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">std</span>::<span class="n">thread</span>::<span class="n">local</span>::<span class="n">LocalKey</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span>::<span class="n">try_with</span><span class="w"> </span><span class="o">???</span><span class="w"></span>
<span class="w">    </span><span class="mi">14632</span><span class="w"> </span><span class="p">(</span><span class="mf">0.9</span><span class="o">%</span><span class="p">)</span><span class="w">    </span><span class="mi">236</span><span class="w"> </span><span class="p">(</span><span class="mf">0.4</span><span class="o">%</span><span class="p">)</span><span class="w">  </span><span class="n">std</span>::<span class="n">sync</span>::<span class="n">once</span>::<span class="n">Once</span>::<span class="n">call_once</span><span class="w">  </span><span class="o">???</span><span class="w"></span>
</code></pre></div>



<a name="203092945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203092945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203092945">(Jul 07 2020 at 11:56)</a>:</h4>
<p>Raised upstream as: <a href="https://github.com/tokio-rs/tracing/issues/783">https://github.com/tokio-rs/tracing/issues/783</a></p>
<p>I haven't followed this discussion to closely, but my rough thoughts are:</p>
<ul>
<li>we definitely need <em>some</em> form of obserbability/instrumentation</li>
<li>tracing crate definitely covers all the features we need, but I am concerned about compile times (like, it seems to be that it has a bit too many features)</li>
<li>I think, in principle, tracing API needn't be costly in terms of compile time, but we probably should nudge maintainers into realizing this potential more :)</li>
</ul>



<a name="203108785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203108785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203108785">(Jul 07 2020 at 14:23)</a>:</h4>
<blockquote>
<p>tracing crate definitely covers all the features we need, but I am concerned about compile times (like, it seems to be that it has a bit too many features)</p>
</blockquote>
<p>we're generally happy to introduce feature flags to cut down on compile times as needed; for instance:</p>
<ul>
<li><a href="https://docs.rs/tracing/0.1.15/tracing/#crate-feature-flags">https://docs.rs/tracing/0.1.15/tracing/#crate-feature-flags</a></li>
<li><a href="https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/#feature-flags">https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/#feature-flags</a></li>
</ul>
<p>it's something we _do_ care a lot about rather deeply, but feedback is always appreciated</p>



<a name="203108896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203108896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203108896">(Jul 07 2020 at 14:24)</a>:</h4>
<p>as for <a href="https://docs.rs/tracing-core/0.1.10/tracing_core/dispatcher/fn.get_default.html">https://docs.rs/tracing-core/0.1.10/tracing_core/dispatcher/fn.get_default.html</a>, I <em>believe</em> this is coming from the macro invocations—lemme doublecheck.</p>



<a name="203109299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203109299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203109299">(Jul 07 2020 at 14:27)</a>:</h4>
<p>two possible candidates of the source of the monomorphized <code>get_default</code>:</p>
<ul>
<li>in the macros that determine whether a span/event is enabled/disabled: <a href="https://github.com/tokio-rs/tracing/blob/971a46b46d5057daaa11bf8d9081f10ba69935d6/tracing/src/macros.rs#L1863">https://github.com/tokio-rs/tracing/blob/971a46b46d5057daaa11bf8d9081f10ba69935d6/tracing/src/macros.rs#L1863</a></li>
<li>in tracing-log's compatibility layer: <a href="https://github.com/tokio-rs/tracing/blob/a1387482e9bd114fa572a9152fd458ef65742a47/tracing-log/src/lib.rs#L159">https://github.com/tokio-rs/tracing/blob/a1387482e9bd114fa572a9152fd458ef65742a47/tracing-log/src/lib.rs#L159</a></li>
</ul>



<a name="203584976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203584976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203584976">(Jul 11 2020 at 07:18)</a>:</h4>
<p>I opened an MCP for adding tracing to rustc: <a href="https://github.com/rust-lang/compiler-team/issues/331">https://github.com/rust-lang/compiler-team/issues/331</a></p>



<a name="203605486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/tracing-tree/near/203605486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/tracing-tree.html#203605486">(Jul 11 2020 at 17:21)</a>:</h4>
<p>Nice :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>